home *** CD-ROM | disk | FTP | other *** search
- INTERFACE
-
- CONST
- VERSION1 = 'VESA Library - Version 1.10/286';
- VERSION2 = '(c) 1994 by Mark Stehr mkstehr@cip.informatik.uni-erlangen.de';
-
- V800x600x16 = $102;
- V1024x768x16 = $104;
- V1280x1024x16 = $106;
- V320x200x256 = $13;
- V640x400x256 = $100;
- V640x480x256 = $101;
- V800x600x256 = $103;
- V1024x768x256 = $105;
- V1280x1024x256 = $107;
- V320x200x32k = $10d;
- V640x480x32k = $110;
- V800x600x32k = $113;
- V1024x768x32k = $116;
- V1280x1024x32k = $119;
- V320x200x64k = $10e;
- V640x480x64k = $111;
- V800x600x64k = $114;
- V1024x768x64k = $117;
- V1280x1024x64k = $11a;
- V320x200x16M = $10f;
- V640x480x16M = $112;
- V800x600x16M = $115;
- V1024x768x16M = $118;
- V1280x1024x16M = $11b;
-
- PEL = FALSE; { SetPaletteFlag }
- BIOS = TRUE; { SetPaletteFlag }
-
- grOk = 0;
- grNoVesa = -1;
- grText = -2;
- grMode16 = -3;
- grHardware = -4;
- grPCX = -5;
- grFontNotFound = -6;
- grNoFontMem = -7;
- grInvalidFontNum = -8;
- grFileNotFound = -9;
- grMode16m = -10;
-
- { define graphics drivers }
- CurrentDriver = -128; { passed to GetModeRange }
- Detect = 9; { requests autodetection }
- CGA = 1;
- MCGA = 2;
- EGA = 3;
- EGA64 = 4;
- EGAMono = 5;
- IBM8514 = 6;
- HercMono = 7;
- ATT400 = 8;
- VGA = 9;
- PC3270 = 10;
-
- { Line styles and widths for Get/SetLineStyle: }
- SolidLn = 0;
- DottedLn = 1;
- CenterLn = 2;
- DashedLn = 3;
- UserBitLn = 4; { User-defined line style }
-
- NormWidth = 1;
- ThickWidth = 3;
-
- { Set/GetTextStyle constants: }
- DefaultFont = 0; { 8x8 bit mapped font }
- TriplexFont = 1; { "Stroked" fonts }
- SmallFont = 2;
- SansSerifFont = 3;
- GothicFont = 4;
-
- HorizDir = 0; { left to right }
- VertDir = 1; { bottom to top }
-
- UserCharSize = 0; { user-defined char size }
-
- { Clipping constants: }
- ClipOn = true;
- ClipOff = false;
-
- { Bar3D constants: }
- TopOn = true;
- TopOff = false;
-
- { Fill patterns for Get/SetFillStyle: }
- EmptyFill = 0; { fills area in background color }
- SolidFill = 1; { fills area in solid fill color }
- LineFill = 2; { --- fill }
- LtSlashFill = 3; { /// fill }
- SlashFill = 4; { /// fill with thick lines }
- BkSlashFill = 5; { \\\ fill with thick lines }
- LtBkSlashFill = 6; { \\\ fill }
- HatchFill = 7; { light hatch fill }
- XHatchFill = 8; { heavy cross hatch fill }
- InterleaveFill = 9; { interleaving line fill }
- WideDotFill = 10; { Widely spaced dot fill }
- CloseDotFill = 11; { Closely spaced dot fill }
- UserFill = 12; { user defined fill }
-
- { BitBlt operators for PutImage: }
- NormalPut = 0; { MOV } { left for 1.0 compatibility }
- CopyPut = 0; { MOV }
- XORPut = 1; { XOR }
- OrPut = 2; { OR }
- AndPut = 3; { AND }
- NotPut = 4; { NOT }
-
- { Horizontal and vertical justification for SetTextJustify: }
- LeftText = 0;
- CenterText = 1;
- RightText = 2;
-
- BottomText = 0;
- { CenterText = 1; already defined above }
- TopText = 2;
-
- TYPE
- LineSettingsType = record
- LineStyle : word;
- Pattern : word;
- Thickness : word;
- END;
-
- TextSettingsType = record
- Font : word;
- Direction : word;
- CharSize : word;
- Horiz : word;
- Vert : word;
- END;
-
- FillSettingsType = record { Pre-defined fill style }
- Pattern : word;
- Color : LONGINT;
- END;
-
- FillPatternType = array[1..8] of byte; { User defined fill style }
-
- PointType = record
- X, Y : integer;
- END;
-
- ViewPortType = record
- x1, y1, x2, y2 : integer;
- Clip : boolean;
- END;
-
- ArcCoordsType = record
- X, Y : integer;
- Xstart, Ystart : integer;
- Xend, Yend : integer;
- END;
-
- ColorType = record
- r,g,b : byte;
- end;
- PaletteType = array [0..$FF] of ColorType;
-
- { *** high-level error handling *** }
- FUNCTION GraphResult : INTEGER;
- FUNCTION GraphErrorMsg(ErrorCode : INTEGER):STRING;
-
- { *** detection, initialization and crt mode routines *** }
- FUNCTION RegisterBGIFont(Font : POINTER):INTEGER;
- PROCEDURE InstallUserFnt(Font : POINTER);
- FUNCTION GetDriverName:STRING;
- PROCEDURE InitVesa(modus : WORD);
- FUNCTION GetModeName(ModeNumber : WORD):STRING;
- PROCEDURE SetGraphMode(modus : WORD);
- FUNCTION GetGraphMode: WORD;
- PROCEDURE GraphDefaults;
- PROCEDURE RestoreCrtMode;
- PROCEDURE CloseVesa;
- FUNCTION GetX:INTEGER;
- FUNCTION GetY:INTEGER;
- FUNCTION GetMaxX:Integer;
- FUNCTION GetMaxY:Integer;
- FUNCTION FindVesaMode(xsize,ysize : word; bitpixel : byte):WORD;
- FUNCTION GetMaxRed:BYTE;
- FUNCTION GetMaxGreen:BYTE;
- FUNCTION GetMaxBlue:BYTE;
- FUNCTION GetMaxPage:BYTE;
- FUNCTION GetVMaxX:INTEGER;
- FUNCTION GetVMaxY:INTEGER;
- PROCEDURE SetRestoreFlag(YesNo : BOOLEAN);
- PROCEDURE SetPaletteFlag(method : BOOLEAN);
- PROCEDURE SetClearFlag(YesNo : BOOLEAN);
-
- { *** Screen, viewport, page routines *** }
- PROCEDURE cleardevice;
- PROCEDURE SetViewPort(x1,y1,x2,y2 : Integer; Clip : BOOLEAN);
- PROCEDURE GetViewSettings(Var ViewPort : ViewPortType);
- PROCEDURE ClearViewPort;
- PROCEDURE SetVisualPage(page : BYTE);
- PROCEDURE SetActivePage(page : BYTE);
-
- { *** point-oriented routines *** }
- PROCEDURE putpixel(x,y : Integer; color : LONGINT);
- PROCEDURE putpixel2(x,y : Integer);
- FUNCTION getpixel(x,y : Integer):LONGINT;
-
- { *** line-oriented routines *** }
- PROCEDURE SetWriteMode(modus : BYTE);
- PROCEDURE lineh(x1,y1,x2,y2 : Integer);
- PROCEDURE linev(x1,y1,x2,y2 : Integer);
- PROCEDURE line(x1,y1,x2,y2 : Integer);
- PROCEDURE LineTo(x,y:INTEGER);
- PROCEDURE LineRel(dx,dy:INTEGER);
- PROCEDURE MoveTo(x,y:INTEGER);
- PROCEDURE MoveRel(dx,dy:INTEGER);
- PROCEDURE SetLineStyle(LineStyle,Pattern,Thickness : WORD);
- PROCEDURE GetLineSettings(VAR LineInfo : LineSettingsType);
-
- { *** polygon, fills and figures *** }
- PROCEDURE bar(x1,y1,x2,y2 : Integer);
- PROCEDURE bar3d(x1,y1,x2,y2,depth : Integer; top : BOOLEAN);
- PROCEDURE rectangle(x1,y1,x2,y2 : Integer);
- PROCEDURE RoundedRectangle(X1,Y1,X2,Y2 : INTEGER; r : Word);
- PROCEDURE DrawPoly(NumPoints : Integer; VAR PolyPoints);
- PROCEDURE FillPoly(NumPoints : WORD; VAR PolyPoints);
- PROCEDURE DrawBezier(NumPoints : WORD; VAR PolyPoints);
- PROCEDURE FloodFill(x,y : Integer; border : LONGINT);
- PROCEDURE SetFillPattern(FillPattern : FillPatternType; color : LONGINT);
- PROCEDURE GetFillSettings(VAR FillInfo : FillSettingsType);
- PROCEDURE GetFillPattern(VAR FillPattern : FillPatternType);
- PROCEDURE SetFillStyle(Pattern : WORD; color : LONGINT);
-
- { *** arc, circle, and other curves *** }
- PROCEDURE circle(x,y,radius: Integer);
- PROCEDURE arc(x,y,startangle,endangle,radius : Integer);
- PROCEDURE PieSlice(x,y,startangle,endangle,radius : Integer);
- PROCEDURE ellipse(x,y,startangle,endangle,xradius,yradius : Integer);
- PROCEDURE FillEllipse(x0,y0: INTEGER;b,a : LONGInt);
- PROCEDURE sector(x,y,startangle,endangle,xradius,yradius : Integer);
- PROCEDURE GetArcCoords(VAR ArcCoords : ArcCoordsType);
- PROCEDURE GetAspectRatio(VAR XAsp,YAsp : WORD);
- PROCEDURE SetAspectRatio(XAsp,YAsp : WORD);
-
- { *** color and palette routines *** }
- FUNCTION GetColor:LONGINT;
- PROCEDURE SetColor(col : LONGINT);
- FUNCTION GetMaxColor:LONGINT;
- PROCEDURE SetPal(VAR pal); { Palette neu setzen }
- PROCEDURE GetPal(VAR pal : PaletteType); { Palette auslesen }
- PROCEDURE PushPal(VAR pal : PaletteType); { Palette verschieben }
- PROCEDURE NewPal(VAR pal : PaletteType);
- PROCEDURE SetRGBPal(color,r,g,b: BYTE);
- PROCEDURE GetRGBPal(color : BYTE; VAR r,g,b: BYTE);
- PROCEDURE GetPalette(VAR pal : PaletteType); { graph.tpu }
- PROCEDURE SetPalette(ColorNum : WORD; color : SHORTINT); { graph.tpu }
- PROCEDURE SetAllPalette(VAR palette); { graph.tpu }
-
- PROCEDURE FadeUp(d:BYTE; pal : PaletteType);
- PROCEDURE FadeDown(d:BYTE; pal : PaletteType);
-
- PROCEDURE border(color : BYTE);
- PROCEDURE grayscale;
- PROCEDURE turnon;
- PROCEDURE turnoff;
-
- { *** bit-image routines *** }
- FUNCTION imagesize(x1,y1,x2,y2 : Integer):LONGINT;
- PROCEDURE putimage(x1,y1,x2,y2 : Integer; VAR SaveAddr);
- PROCEDURE putsprite(x1,y1,x2,y2 : Integer; VAR SaveAddr);
- PROCEDURE getimage(x1,y1,x2,y2 : Integer;VAR SaveAddr);
- PROCEDURE fillimage(x,y,x2,y2 : Integer);
- PROCEDURE LoadPCX(x1,y1 : Integer; PCXFName : STRING);
- PROCEDURE SavePCX(x1,y1,x2,y2 : Integer; PCXFName : STRING);
-
- { *** text routines *** }
- PROCEDURE outtext(text : STRING);
- PROCEDURE outtextxy(x,y : Integer; text : STRING);
- FUNCTION TextWidth(Text : STRING):WORD;
- FUNCTION TextHeight(Text : STRING):WORD;
- PROCEDURE SetUserCharSize(MultX,DivX,MultY,DivY : WORD);
- PROCEDURE SetTextStyle(Font,Direction,CharSize : WORD);
- PROCEDURE SetTextJustify(Horiz,Vert : WORD);
- PROCEDURE GetTextSettings(VAR TextInfo : TextSettingsType);
-
- { *** scrolling routines *** }
- PROCEDURE ResetScroll;
- PROCEDURE ScrollUp;
- PROCEDURE ScrollDown;
- PROCEDURE ScrollRight;
- PROCEDURE ScrollLeft;
- PROCEDURE Scroll(i,j : INTEGER);
- PROCEDURE Split(zeile : WORD);
- PROCEDURE SetVirtualWidth(Width : WORD);
-
- { *** other routines *** }
- PROCEDURE swapRGB;
- FUNCTION rgb(r,g,b : WORD):LONGINT;
- FUNCTION st(zahl : LONGINT):STRING;
- FUNCTION min(a,b : LONGINT):LONGINT;
- PROCEDURE swapI(VAR a,b : INTEGER);
- PROCEDURE swapB(VAR a,b : BYTE);
- PROCEDURE Beep;